<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: lzy
  Date: 2018/9/11
  Time: 18:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>dynamic input</title>
    <script src="http://libs.baidu.com/jquery/1.7.2/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            var i = 1;
            $("#add0").click(function () {
                $("#del0").after("<s:textfield name="name_1" label="Name"/><br/>");
                i++;
                return false;
            })
        })
    </script>
</head>
<body>
<h4>Dynamic Input</h4>
<s:form>
    <s:textfield name="name_0" label="Name"/>
    <s:textfield name="birth_0" label="Birth"/>
    <s:submit/>
</s:form>

<button id="add0" name="add0">Add manager</button>
<br/>
<button id="del0" name="del0">Del manager</button>
<br/>
</body>
</html>
